<?php
include("../../classes/bd.php");
?>

<table width="100%" border="0">
  <tr>
    <th width="90%" align="left">Titulo</td>
  <th width="10%" align="left">Op&ccedil;&otilde;es</td>  
  </tr>

<?php
$listasql	= mysql_query("SELECT * FROM convenios_categoria ORDER BY titulo");
$x=0;
while($row	= mysql_fetch_array($listasql)){
$x%2 == 0?$corfundo = "#FFFFFF":$corfundo = "#f0f0f0";
?>

 <tr bgcolor="<?=$corfundo?>">
    <td width="90%">
	<?=htmlentities($row['titulo'])?><br />
    <div id="name_<?=$row['id']?>" style="display:none">
    <input value="<?=$row['titulo']?>" id="titulo_<?=$row['id']?>" />
    <input type="button" class="button" value="Salvar" onclick="javascript:SalvaEdicao(<?=$row['id']?>);" /></div>
</td>
    <td width="10%"><img src="../../images/edit.gif" style="cursor:pointer" onclick="javascript:abreEdicao(<?=$row['id']?>);" /><img src="../../images/delete.gif" style="cursor:pointer" onclick="javascript:apagacategoria(<?=$row['id']?>);"></td>
  </tr>


<? $x++; } ?>
</table>
